package com.argticling.model;

import com.argticling.model.privilege.Privilege;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "USER")
public class User implements Persistable {
    private String username;
    private String password;
    private String name;
    private String surname;
    private String role;
    private String id;

    public User(){
        
    }

    public User(String username, String password, String name, String surname, String role) {
        this.username = username;
        this.password = password;
        this.name = name;
        this.surname = surname;
        this.role=role;
    }

    @Id
    @Column(name = "id", updatable = false, nullable = false)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Column(name ="ROLE")
    public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

    @Column(name = "NAME")
    public String getName() {
        return name;
    }

    //@OneToOne(targetEntity=com.argticling.model.Profile.class)
    //@Column(name= "USER_PROFILE")


    @Column(name = "SURNAME")
    public String getSurname() {
        return surname;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setSurname(String surname) {
        this.surname = surname;
    }

    @Column(name = "USERNAME")
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Column(name = "PASSWORD")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
